package cn.wolfcode.qo;

/**
 * 封装分页查询需要的两个条件，由页面传入的两个条件
 */
public class QueryObject {
    private int currentPage=1;
    private int pageSize = 3;

    public QueryObject(int currentPage, int pageSize) {
        this.currentPage = currentPage;
        this.pageSize = pageSize;
    }

    public QueryObject() {
    }

    public int getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(int currentPage) {
        this.currentPage = currentPage;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }
    //limit 分页的起始数据获取
    public int getStart(){
        return (currentPage-1)*pageSize;
    }
}
